<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" >
      <van-swipe-item v-for="item in list" :key="item.id">
          <img :src="url + item.img" alt="">
      </van-swipe-item>
      <!-- <p>{{item.img}}</p> -->
    </van-swipe>
  </div>
</template>

<script>
export default {
  name: "MyappSeipe",

  data() {
    return {
        list:[],
        url:'https://api.aslegou.top',
    };
  },

  mounted() {
      this.getSwipe()
      },
    
  methods: {
     getSwipe(){
           this.$axios.get('https://api.aslegou.top/api/getbanner').then(res=>{
            //    console.log(res);
               this.list = res.data.list
            //    console.log(this.list,'list');
           })
      }
  },
};
</script>

<style lang="scss" scoped>
.van-swipe{
    height: 200px;
}
.van-swipe-item {
    img{
        width: 100%;
        height: 100%;
    }
}
</style>